package cn.lg.soar.boot.fc.tool;

import cn.lg.soar.boot.fc.constants.RoomConstant;
//import com.sun.org.apache.regexp.internal.RE;

/**
 * 功能简述
 *
 * @author: zp
 * @date: 2025-01-15 13:32
 * @version: 1.0.0
 */
public class RoomValidation {

    /**
     * 效验 是否有电梯 参数是否正确
     * @param type
     * @return
     */
    public static boolean checkElevator (int type) {

        boolean flag = type == RoomConstant.ELEVATOR_ZERO || type == RoomConstant.ELEVATOR_ONE;

        return flag;
    }

    /**
     * 效验 楼层类型 参数是否正确
     * @param type
     * @return
     */
    public static boolean checkFloorType (int type) {

        boolean flag =
                type == RoomConstant.FLOOR_TYPE_ZERO || type == RoomConstant.FLOOR_TYPE_ONE || type == RoomConstant.FLOOR_TYPE_TWO;

        return flag;
    }

    /**
     * 效验 房间类型 参数是否正确
     * @param type
     * @return
     */
    public static boolean checkRoomType (int type) {

        boolean flag = type == RoomConstant.ROOM_TYPE_ZERO || type == RoomConstant.ROOM_TYPE_ONE;

        return flag;
    }

    /**
     * 效验 付款方式 参数是否正确
     * @param type
     * @return
     */
    public static boolean checkPayWay (int type) {

        boolean flag =
                type == RoomConstant.PAY_WAY_ZERO || type == RoomConstant.PAY_WAY_ONE || type == RoomConstant.PAY_WAY_TWO || type == RoomConstant.PAY_WAY_THREE || type == RoomConstant.PAY_WAY_FOUR;

        return flag;
    }

    /**
     * 效验 租房方式 参数是否正确
     * @param type
     * @return
     */
    public static boolean checkTenancyWay (int type) {

        boolean flag = type == RoomConstant.TENANCY_WAY_ZERO || type == RoomConstant.TENANCY_WAY_ONE;

        return flag;
    }

    /**
     * 效验 使用状态 参数是否正确
     * @param type
     * @return
     */
    public static boolean checkUseState (int type) {

        boolean flag =
                type == RoomConstant.USE_STATE_ZERO || type == RoomConstant.USE_STATE_ONE || type == RoomConstant.USE_STATE_TWO || type == RoomConstant.USE_STATE_THREE || type == RoomConstant.USE_STATE_FOUR;

        return flag;
    }

    /**
     * 效验 是否组满 参数是否正确
     * @param type
     * @return
     */
    public static boolean checkIsFull (int type) {

        boolean flag = type == RoomConstant.FULL_ZERO || type == RoomConstant.FULL_ONE;

        return flag;
    }

    /**
     * 效验 是否采用租金模式 参数是否正确
     * @param type
     * @return
     */
    public static boolean checkIsRent (int type) {
        boolean flag = RoomConstant.RENT_ONE == type || RoomConstant.RENT_ZERO == type;
        return flag;
    }

}
